import {Routes} from '@angular/router';
// 引入路由模块
import {UserComponent} from './app/userComponents/user.component';
import {CapacityComponent} from './app/capacityComponents/capacity.component';
import {SomeComponent} from './app/someComponents/some.component';
import {HomeComponent} from './app/homeComponents/home.component';
import {LoginComponent} from './app/loginComponents/login.component';
import {RootComponent} from './app/rootComponents/root.component';
export const rootRouterConfig:Routes = [
    {
        path:"",
        component:LoginComponent
    },
    {
        path:"login",
        component:LoginComponent
    },
    {
        path:"root",
        component:RootComponent,
        children:[
            {
                path:"user",
                component:UserComponent
            },
            {
                path:"capacity",
                component:CapacityComponent
            },
            {
                path:"some",
                component:SomeComponent
            },
            {
                path:"home",
                component:HomeComponent
            },
            {
                path:"",
                redirectTo:"home",
                pathMatch:"full"
            }

        ]
    },
    {
        path:"*",
        redirectTo:'login',
       pathMatch:"full"
    }
   
   
]